package com.donggua.aichebao.scanner.code;

import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import android.view.KeyEvent;
import android.view.View;

import com.donggua.aichebao.DGPermissionUtil;

import java.util.ArrayList;

/**
 * Created by fzh on 2017/8/15.
 */

public abstract class DGScannerCodeBase {

    protected Activity mActivity;
    protected View mMainView;

    public DGScannerCodeBase(Activity act,View mainView){
        mActivity = act;
        mMainView = mainView;
        DGPermissionUtil.grantPermission(mActivity);
    }
    public abstract void startScanner();
    public abstract void stopScanner();
    public abstract void onResume();
    public abstract void onPause();
    public abstract void onDestroy();
    public abstract boolean onKeyDown(int keyCode, KeyEvent event);
    public abstract void onActivityResult(int requestCode, int resultCode, Intent intent);

}
